<?php 
$username = $this->session->userdata('username');
$password = $this->session->userdata('password');
if (empty($username) AND empty($password)){
	?>
		<div style="line-height:70px; text-align:center; font-size:30px; width:900px; margin-top:280px; margin-left:auto; margin-right:auto; color:red; min-height:70px; font-family:"Agency FB";" >
		Anda Harus Login Terlebih Dahulu !!!
		</div>
	<?php
}else{
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Absen Karyawan</title>

<!-- CSS Bootstrap -->
<link href="<?php echo base_url(); ?>assets/css/bootstrap.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>assets/css/docs.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>assets/media/css/demo_page.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>assets/media/css/demo_table.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>assets/css/app.css" rel="stylesheet">

<!-- JS Bootstrap -->
<script src="<?php echo base_url(); ?>assets/js/jquery.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-transition.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-alert.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-modal.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-dropdown.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-scrollspy.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-tab.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-tooltip.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-popover.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-button.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-collapse.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-carousel.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-typeahead.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap-affix.js"></script>
<script src="<?php echo base_url(); ?>assets/js/holder/holder.js"></script>
<script src="<?php echo base_url(); ?>assets/js/google-code-prettify/prettify.js"></script>
<!--<script src="<?php echo base_url(); ?>assets/js/application.js"></script>-->

<script src="<?php echo base_url(); ?>assets/media/js/jquery.dataTables.js"></script>
<script language="javascript" src="<?php echo base_url('ajax/js/1');?>"></script> <!-- main js-->

</head>
<body>
<!-- Header -->
<div id="wrapperheader">
	<img src="<?php echo base_url();?>assets/img/logo8.jpg" width=50 height=30>
	PT. Delapan Komunikasi Indonesia
	<div id="myMsg"></div>
</div>

<!-- Menu -->
<div class="navbar">
<div class="navbar navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-responsive-collapse">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</a>
			<div class="nav-collapse collapse navbar-responsive-collapse">
				<ul class="nav">
					<li><a href="<?php echo base_url(); ?>login/home"><i style="margin-top:3px;" class="icon-home"></i></a></li>
					<?php
						if($this->session->userdata('level')=='1'){
					?>
					<li><a href="<?php echo base_url(); ?>login/users">Manage Users</a></li>
					<li class="dropdown">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown"> Setup master <b class="caret"></b></a>
						<ul class="dropdown-menu">
							<!--
							<li><a href="<?php //echo base_url(); ?>login/departemen">Departemen</a></li>
							<li><a href="<?php //echo base_url(); ?>login/jam_kerja">Jam Kerja</a></li>
							<li><a href="<?php //echo base_url(); ?>login/karyawan">Karyawan</a></li>
							-->
							<li><a href="#" class="header_menu" id="dept" type="html">Departemen</a></li>
							<li><a href="#" class="header_menu" id="jam_kerja" type="html">Jam Kerja</a></li>
							<li><a href="#" class="header_menu" id="karyawan" type="html">Karyawan</a></li>							
						</ul> 
					</li>
					<?php
						}
					?>
					<li><a href="#" class="header_menu" id="hr" type="html">HR</a></li>
					<li><a href="#" class="header_menu" id="finance" type="html">Finance</a></li>
					<li><a href="#" class="header_menu" id="purchasing" type="html">Puchasing</a></li>
					<li><a href="#" class="header_menu" id="marketing" type="html">Marketing</a></li>
					<li><a href="#" class="header_menu" id="warehouse" type="html">Warehouse</a></li>					
				</ul>
				<ul class="nav pull-right">
					<li>
					<a href="#">Hai, <?php echo $this->session->userdata('username'); ?></a> 
					<script src="<?php echo base_url(); ?>assets/js/clock.js" type="text/javascript"></script>
					<span id="clock"></span>
					</li>
					<li class="divider-vertical"></li>
					<li class="dropdown">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown"><b style="margin-top:6px;" class="icon-cog"></b></a>
						<ul class="dropdown-menu">
							<li><a href="#">Profil</a></li>
							<li><a href="#">Update Profil</a></li>
							<li class="divider"></li>
							<li><a href="#myModal"  data-toggle="modal">Logout</a><?php //echo anchor("login/logout", 'Logout') ?></li>
						</ul>
					</li>
				</ul>
			
			</div>
		</div>
	</div>
</div>
</div>



<!-- Modal Logout-->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="margin-top:180px;">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<div style="font-size:19px;">Konfirmasi !!!</div>
	</div>
	<div class="modal-body">
		<p>Hai, <b><?php echo $this->session->userdata('username'); ?></b><p>
		<p>Apakah anda yakin akan keluar dari halaman system ini ?</p>
	</div>
	<div class="modal-footer">
		<button class="btn" data-dismiss="modal" aria-hidden="true">No, thanks</button>
		<a href="<?php echo base_url(); ?>ajax/logout">
			<input type="submit" value="Yes, Logout" class="btn btn-inverse">
		</a>
	</div>
</div>
	
<?php
}
?>